﻿using AutoMapper;
using TodoApp.BrandModel;
using TodoApp.CategoryModel;
using TodoApp.GoodsModel;
using TodoApp.LiveShopAddressDTO;
using TodoApp.LiveShopCarDTO;
using TodoApp.LiveShopGoodsDTO;
using TodoApp.LiveShopSkuDTO;
using TodoApp.LiveShopUserInfosDTO;
using TodoApp.LiveShopUsersDTO;
using TodoApp.OrdesModel;
using TodoApp.TodoBrandDTO;
using TodoApp.TodoCategorysDTO;
using TodoApp.TodoGoodsDTO;
using TodoApp.TodoLiveShopCategorysDTO;
using TodoApp.TodoOrdesDTO;
using TodoApp.TodoStatusDTO;
using TodoApp.UsersModel;

namespace TodoApp
{
    public class TodoAppApplicationAutoMapperProfile : Profile
    {
        public TodoAppApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            // 商品表 
            CreateMap<GoodsAddDTO, TodoGoods>();// 添加 
            CreateMap<TodoGoods , GoodsShowDTO>(); // 显示
            
            // 商品分类表 
            CreateMap<CategorysAddDTO, TodoCategorys>();
            CreateMap<TodoCategorys, CategorysShowDTO>();

            // 商品 品牌表 
            CreateMap<TodoBrandAddDTO, TodoBrand>();
            CreateMap<TodoBrand, TodoBrandShowDTO>();

            // 商品统一规范 
            CreateMap<LiveShopGoodsAddDTO, LiveShopGoods>();
            CreateMap<LiveShopGoods, LiveShopGoodsShowDTO>();

            // 商品分类表 统一规范 
            CreateMap<LiveShopCategorysAddDTO, LiveShopCategorys>();
            CreateMap<LiveShopCategorys, LiveShopCategorysShowDTO>();

            // 购物车
            CreateMap<LiveShopCarAddDTO, LiveShopCar>();
            CreateMap<LiveShopCar, LiveShopCarShowDTO>();

            // sku 
            CreateMap<LiveShopSku, LiveShopSkuShowDTO>();
            CreateMap<LiveShopSkuAddDTO, LiveShopSku>();

            // 账号 
            CreateMap<LiveShopUsersAddDTO, LiveShopUsers>();
            CreateMap<LiveShopUsers, LiveShopUsersShowDTO>();

            // 用户个人信息绑定 
            CreateMap<LiveShopUserInfosAddDTO, LiveShopUserInfos>();
            CreateMap<LiveShopUserInfos, LiveShopUserInfosShowDTO>();

            // 收货地址 
            CreateMap<LiveShopAddressAddDTO , LiveShopAddress>();
            CreateMap<LiveShopAddress , LiveShopAddressShowDTO>();

            // 订单表 统一规范
            CreateMap<TodoGoodsOrdesAddDTO, TodoGoodsOrdes>();
            CreateMap<TodoGoodsOrdes, TodoGoodsOrdesShowDTO>();

            // 订单状态
            CreateMap<TodoStatusAddDTO, TodoStatus>();
            CreateMap<TodoStatus, TodoStatusShowDTO>();


        }
    }
}
